<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<link rel="stylesheet" href="../lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>买卖订单表</title>
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 产品管理 <span class="c-gray en">&gt;</span> 产品列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
	<div class="text-c">
	日期范围：
		<input type="text" onfocus="WdatePicker({isShowClear:true,readOnly:true,maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({isShowClear:true,readOnly:true,minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
		<button name="" id="query" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 订单搜索</button>
	</div>
		<div class="mt-20">
			<table class="table table-border table-bordered table-bg table-hover table-sort">
				<thead>
					<tr class="text-c">
						<th width="80">订单号</th>
						<th width="80">日期</th>
						<th width="80">总计</th>
						<th width="80">供应商</th>
						<th width="80">采购人员</th>
					</tr>
				</thead>
				<tbody>
				</tbody>
			</table>
		</div>
		<div id="pageNum" class="text-c">
			<a id="first" class="btn btn-primary radius">首页</a>
			<a id="lastPage" class="btn btn-primary radius" >上一页</a>
			<span class="pageSpan"><label id="nowPage">0</label>/<label id="totalPage">0</label></span>
			<a id="nextPage" class="btn btn-primary radius">下一页</a>
			<a id="last" class="btn btn-primary radius">尾页</a>
		</div>
</div>
<script type="text/javascript" src="../MyJs/date_string.js"></script> 
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="../lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="../static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> 
</body>
<script type="text/javascript">
$(function (){
    $(window).load(function(){
        getListByPage(1);
    });
    //搜索
    $("#query").click(function(){
        getListByPage(1);
    });
    //首页
    $("#first").click(function(){
        getListByPage(1);
    });
    //尾页
    $("#last").click(function(){
        var total_page = parseInt($("#totalPage").html());
        getListByPage(total_page);
    });
    //上一页
    $("#lastPage").click(function(){
        var now_page = parseInt($("#nowPage").html());
        getListByPage(now_page <= 1 ? 1 : now_page - 1);
    });
    //下一页
    $("#nextPage").click(function(){
        var now_page = parseInt($("#nowPage").html());
        var total_page = parseInt($("#totalPage").html());
        getListByPage(now_page + 1 > total_page ? total_page : now_page + 1);
    });
function getListByPage(pageNum){
	$.post("../mmdd.do", {"v":"getall", "page":pageNum}, function(data) {
		$("table > tbody > tr").remove();
		$("strong").html(data.tr);
		$("#pageCode").html(data.cp);
		$("#totalPage").html(data.tp);
		$(data.beanList).each(function(i,v) {
			var content = "<tr class='text-c'>"
			content +=""
			content += "<td>"+v.order_id+"</td>"
			content += '<td>'+jsonDate_str(v.order_date)+'</u></td>'
			content += "<td>"+v.order_sub+"</td>"
			content += "<td>"+v.par_name+"</td>"
			content += "<td>"+v.emp_name+"</td>"
			//content += '<td class="td-manage"><a title="编辑" href="javascript:;" onclick="fenwan_edit(\'修改记录\',\'fenwan-edit.html?id='+v.order_id+'\',\'\',\'510\')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>  <a title="删除" href="javascript:;" onclick="fenwan_del(this,'+ v.order_id +')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>'
			content += "</tr>"
			$("table > tbody").append(content);
		});
	},"json");
}
});
</script>
</html>